Type.registerNamespace("BM");BM.ErrorLabelAddition=function(a,b){BM.ErrorLabelAddition.initializeBase(this,[a,b])};BM.ErrorLabelAddition.CssClass="MForm-ErrLbl";BM.ErrorLabelAddition.prototype={load:function(){for(var a=0;a<this.getItem().getConstraints().length;a++){var b=this.getItem().getConstraints()[a];b.addNotMet(Function.createDelegate(this,this.constraintNotMet));b.addMet(Function.createDelegate(this,this.clearErrorText))}},constraintNotMet:function(a,b){this.updateErrorText(a.getErrorText())},updateErrorText:function(b){if(!b){return}var a=this.getErrorLabel();a.style.display="block";a.innerHTML=b},clearErrorText:function(){var a=this.getErrorLabel();a.style.display="none";a.innerHTML=""},getErrorLabel:function(){if(this.errorLabel==null){this.errorLabel=$(this.getItem().getNode()).find("."+BM.ErrorLabelAddition.CssClass)[0]}return this.errorLabel}};BM.ErrorLabelAddition.registerClass("BM.ErrorLabelAddition",BM.Addition);